HAL PLAY state and error functions migration

This section provides information about the HAL PLAY state and error functions migration.

HAL PLAY get state

HAL1

HAL2

HAL_PLAY_GetState(const HAL_PLAY_HandleTypeDef *hplay)
HAL_PLAY_GetState(const hal_play_handle_t *hplay)

HAL PLAY get error

HAL1

HAL2

In HAL1, HAL_PLAY_GetError is used to get the error code in case of an error condition. It returns one of the following values HAL_PLAY_ERROR_NONE, HAL_PLAY_ERROR_INVALID_PARAM and HAL_PLAY_ERROR_INVALID_CALLBACK.

HAL_PLAY_GetError(const HAL_PLAY_HandleTypeDef *hplay)

In HAL2, this function is no longer available. Error codes are reported by direct function return. For more details, see HAL PLAY error codes.

Related concept: